package com.wyj.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.util.HashMap;
import java.util.Map;

/**
 * @author 王永杰
 * @Description 触发消息通知的事件
 * @since 2022/8/18
 */
@AllArgsConstructor
@NoArgsConstructor
@ToString
public class event {

    private String topic;
    private int userId;
    private int EntityType;
    private int EntityId;
    private int EntityUserId;
    private Map<String,Object> data = new HashMap<>();


    public String getTopic() {
        return topic;
    }

    public event setTopic(String topic) {
        this.topic = topic;
        return this;
    }

    public int getUserId() {
        return userId;
    }

    public event setUserId(int userId) {
        this.userId = userId;
        return this;
    }

    public int getEntityType() {
        return EntityType;
    }

    public event setEntityType(int entityType) {
        EntityType = entityType;
        return this;
    }

    public int getEntityId() {
        return EntityId;
    }

    public event setEntityId(int entityId) {
        EntityId = entityId;
        return this;
    }

    public int getEntityUserId() {
        return EntityUserId;
    }

    public event setEntityUserId(int entityUserId) {
        EntityUserId = entityUserId;
        return this;
    }

    public Map<String, Object> getData() {
        return data;
    }

    public event setData(String key,Object obj) {
        this.data.put(key,obj);
        return this;
    }
}
